package com.xxgc.wujiaoservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import lombok.Data;
import org.dromara.autotable.annotation.ColumnComment;
import org.dromara.autotable.annotation.ColumnDefault;
import org.dromara.autotable.annotation.mysql.MysqlTypeConstant;
import org.dromara.mpe.autotable.annotation.ColumnId;
import org.dromara.mpe.autotable.annotation.Table;
import org.dromara.mpe.processer.annotation.AutoDefine;
import org.dromara.mpe.processer.annotation.AutoMapper;
import org.dromara.mpe.processer.annotation.AutoRepository;

//https://www.yuque.com/dontang/codewiki/owoykf
@AutoDefine // 新增
@AutoMapper // 新增
@AutoRepository // 新增
// @Data自动生成set get方法
@Data
@Table(value = "zde_users", comment = "测试表")
public class UsersEntity {

    @ColumnComment("id")
    @ColumnId(mode = IdType.AUTO, comment = "id主键", type = MysqlTypeConstant.BIGINT, length = 32)
    private String id;

    @ColumnComment("用户名")
    private String username;

    @ColumnComment("密码")
    private String password;

    @ColumnComment("小程序唯一id")
    private String openId;

    @ColumnComment("昵称")
    private String nickname;

    @ColumnComment("性别")
    @ColumnDefault("男")
    private String sex;

    @ColumnComment("邮箱")
    private String email;

    @ColumnComment("手机号")
    private String phone;

    @ColumnComment("头像")
    @ColumnDefault("https://picsum.photos/200/200")
    private String avatar;

    // 等级
    @ColumnComment("等级")
    @ColumnDefault("1")
    private Integer level;

    // 经验
    @ColumnComment("经验")
    @ColumnDefault("0")
    private Integer experience;

    // 五角币
    @ColumnComment("五角币")
    @ColumnDefault("100")
    private Integer gold;

    // 点券
    @ColumnComment("点券")
    @ColumnDefault("0")
    private Integer ticket;


}
